home *** CD-ROM | disk | FTP | other *** search
/ 3D World 76 / 3DWI76.iso / pc / Tutorials / qa_minis / XSI QA / Model_rendering.js < prev    next >
Text File  |  2006-01-13  |  939b  |  25 lines

  1. //Usage: Select all the models you want to render as separate images and run the script
  2.  
  3.  
  4.  
  5. //These lines creates a list of all your models and loop the script trough them
  6. var oSel = GetValue("SelectionList")
  7. for(i=0;i<oSel.Count;i++){
  8.  
  9.  
  10. //This line creates the pass and gives it the same name as the current model
  11. CreatePass(null, oSel(i).Name, null);
  12.  
  13. //This line sets the file name of the rendered picture to the same as the current model
  14. SetValue("Passes."+oSel(i).Name+".RenderOptions.ImageFileName", "Render_Pictures\\"+oSel(i).Name, null);
  15.  
  16. // These lines turne of booth the render and viewport visibility for all the objects that are to be hidden.
  17. SelectObj("Passes."+oSel(i).Name+".Background_Objects_Partition", null, null);
  18. ToggleVisibility(null, null, null);
  19.  
  20.  
  21. //These line creates a new partition containing the current model
  22. SelectObj(oSel(i), "BRANCH", null);
  23. CreatePartition(null, oSel(i).Name, null, null);
  24. DeselectAll();
  25. }